package com.ruoyi.project.channel.userLevelConfig.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.channel.userLevelConfig.mapper.UserLevelConfigMapper;
import com.ruoyi.project.channel.userLevelConfig.domain.UserLevelConfig;
import com.ruoyi.project.channel.userLevelConfig.service.IUserLevelConfigService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 会员等级 服务层实现
 * 
 * @author CAIN
 * @date 2021-01-09
 */
@Service
public class UserLevelConfigServiceImpl implements IUserLevelConfigService 
{
	@Autowired
	private UserLevelConfigMapper userLevelConfigMapper;

	/**
     * 查询会员等级信息
     * 
     * @param levelId 会员等级ID
     * @return 会员等级信息
     */
    @Override
	public UserLevelConfig selectUserLevelConfigById(Integer levelId)
	{
	    return userLevelConfigMapper.selectUserLevelConfigById(levelId);
	}
	
	/**
     * 查询会员等级列表
     * 
     * @param userLevelConfig 会员等级信息
     * @return 会员等级集合
     */
	@Override
	public List<UserLevelConfig> selectUserLevelConfigList(UserLevelConfig userLevelConfig)
	{
	    return userLevelConfigMapper.selectUserLevelConfigList(userLevelConfig);
	}
	
    /**
     * 新增会员等级
     * 
     * @param userLevelConfig 会员等级信息
     * @return 结果
     */
	@Override
	public int insertUserLevelConfig(UserLevelConfig userLevelConfig)
	{
	    return userLevelConfigMapper.insertUserLevelConfig(userLevelConfig);
	}
	
	/**
     * 修改会员等级
     * 
     * @param userLevelConfig 会员等级信息
     * @return 结果
     */
	@Override
	public int updateUserLevelConfig(UserLevelConfig userLevelConfig)
	{
	    return userLevelConfigMapper.updateUserLevelConfig(userLevelConfig);
	}

	/**
     * 删除会员等级对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteUserLevelConfigByIds(String ids)
	{
		return userLevelConfigMapper.deleteUserLevelConfigByIds(Convert.toStrArray(ids));
	}
	
}
